﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using MCP.Data.CF_Entities;

namespace MoneyCounter.Controllers
{
    public class AdminPanelController : Controller
    {
        //
        // GET: /AdminPanel/

        public ActionResult AdminPanelAction()
        {
			string curentUser = HttpContext.User.Identity.Name;
            return View();
        }

		public ActionResult ManageTariffs()
		{
			return View();
		}

		public ActionResult ManageUsers()
		{
			MCPDB db = new MCPDB();
			List<User> users = db.Users.ToList();
			return View(users);
		}

		public ActionResult AddUser()
		{
			return View();
		}

		[HttpPost]
		public ActionResult AddUser(User model)
		{
			MCPDB db = new MCPDB();
			db.Users.Add(model);
			db.SaveChanges();
			return RedirectToAction("AdminPanelAction");
		}

		public ActionResult EditUser()
		{
			return View();
		}

		public ActionResult DeleteUser()
		{
			return View();
		}
    }
}
